package com.gscitysfy.cus.drain.modules.assets.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gscitysfy.cloudfrmwk.assistant.domain.Result;

import com.gscitysfy.cus.drain.modules.assets.entity.MoperAssetsEtRecord;
import com.gscitysfy.cus.drain.modules.assets.service.IMoperAssetsEtRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/record")
public class MoperAssetsEtRecordController {

    @Autowired
    private IMoperAssetsEtRecordService coammgrAssetsRecordService;


    /**
     * 获取操作信息
     *
     * @param page
     * @param coamId
     * @return
     */

    @GetMapping("/getrecord")
    public Result getRecord(Page<MoperAssetsEtRecord> page, String coamId) {
        return Result.content(coammgrAssetsRecordService.list(page, coamId));
    }


    /**
     * 保存操作信息
     *
     * @param record
     * @return
     */

    @PostMapping("/saveRecord")
    public Result saveRecord(@RequestBody MoperAssetsEtRecord record) {

        return Result.content(coammgrAssetsRecordService.saveContract(record));
    }

}

